import i18n from '@/common/lang'

export const columns = [
  {
    label: '询价单号',
    minWidth: 150,
    prop: 'number',
    fixed: true
  },
  {
    label: '询价标题',
    prop: 'title',
    minWidth: 140
  },
  {
    label: '采购组织',
    prop: 'purchaseOrg',
    minWidth: 140
  },
  {
    label: '开始时间',
    prop: 'beginDate',
    minWidth: 170
  },
  {
    label: '结束时间',
    prop: 'endDate',
    minWidth: 170
  },
  {
    label: '创建人',
    prop: 'createName',
    width: 'auto'
  },
  {
    label: '申请时间',
    prop: 'createTime',
    minWidth: 170
  },
  {
    label: '状态',
    prop: 'state',
    width: 80
  }
]
export const actions = [
  {
    key: 'detail',
    text: '查看',
    permissions: 'purchase:enquiry:detail'
  },
  {
    key: 'send',
    text: '发送',
    permissions: 'purchase:enquiry:send'
  },
  {
    key: 'delay',
    text: '延期',
    permissions: 'purchase:enquiry:delay'
  },
  {
    key: 'cancel',
    text: '取消',
    permissions: 'purchase:enquiry:cancel'
  },
  {
    key: 'end',
    text: '终止',
    permissions: 'purchase:enquiry:end'
  },
  {
    key: 'viewQuotation',
    text: '查看报价',
    permissions: 'purchase:enquiry:viewQuotation'
  }
]
// 询价物料清单
export const enquiryMaterialColumns = [
  {
    label: '行号',
    minWidth: 60,
    prop: 'lineNumber',
    fixed: true
  },
  {
    label: '来源单号',
    minWidth: 150,
    prop: 'lineNumber',
    fixed: true
  },
  {
    label: i18n.t('config.material.code'),
    minWidth: 140,
    prop: 'materialCode'
  },
  {
    label: i18n.t('config.material.name'),
    minWidth: 140,
    prop: 'materialName'
  },
  {
    label: i18n.t('config.material.specs'),
    minWidth: 140,
    prop: 'materialSpecs'
  },
  {
    label: i18n.t('config.materialType.name'),
    minWidth: 140,
    prop: 'materialType'
  },
  {
    label: i18n.t('config.material.unit'),
    minWidth: 100,
    prop: 'materialUnit'
  },
  {
    label: '数量',
    minWidth: 120,
    prop: 'quantity'
  },
  {
    label: '参考单价(含税)/元',
    minWidth: 130,
    prop: 'quotation'
  },
  {
    label: '税率/%',
    minWidth: 80,
    prop: 'taxRate'
  },
  {
    label: '期望交货日期',
    minWidth: 170,
    prop: 'deliveryDate'
  },
  {
    label: '交付仓库',
    minWidth: 170,
    prop: 'deliveryAddrName'
  },
  {
    label: '地址',
    minWidth: 170,
    prop: 'deliveryAddr'
  },
  {
    label: '备注',
    minWidth: 180,
    prop: 'remark'
  }
]

// 询价供应商列表
export const enquirySupplierColumns = [
  {
    label: '供应商编码',
    prop: 'supplierCode',
    minWidth: 180
  },
  {
    label: '供应商名称',
    prop: 'fullName',
    minWidth: 180
  }
]

// 报价详情列
export const quotationColumns = [
  {
    label: '供应商编码',
    prop: 'supplierCode',
    minWidth: 180
  },
  {
    label: '供应商名称',
    prop: 'fullName',
    minWidth: 180
  },
  {
    label: '报价单价(含税)/元',
    prop: 'unitPrice',
    minWidth: 180
  },
  {
    label: '分项总价(含税)/元',
    prop: 'totalPrice',
    minWidth: 180
  },
  {
    label: '备注',
    prop: 'remark',
    minWidth: 180
  }
]
